<template>
  <el-dialog
    append-to-body
    title="详情"
    :visible.sync="dialogVisible"
    width="800px"
  >
    <el-descriptions
      border
      :column="2"
      content-class-name="contentClass"
      label-class-name="labelClass"
    >
      <el-descriptions-item label="名称" :span="2">
        {{ form.name }}
      </el-descriptions-item>
      <el-descriptions-item label="肥力等级">
        {{ form.flstep }}
      </el-descriptions-item>
      <el-descriptions-item label="砂粒">
        {{ form.sl }}
      </el-descriptions-item>
      <el-descriptions-item label="粉粒">
        {{ form.fl }}
      </el-descriptions-item>
      <el-descriptions-item label="黏粒">
        {{ form.nl }}
      </el-descriptions-item>
      <el-descriptions-item label="容重">
        {{ form.unit_weight }}
      </el-descriptions-item>
      <el-descriptions-item label="田间持水率">
        {{ form.field_capacity }}
      </el-descriptions-item>
      <el-descriptions-item
        label="饱和含水率
"
      >
        {{ form.water_content }}
      </el-descriptions-item>
      <el-descriptions-item
        label="凋萎系数
"
      >
        {{ form.wilting_coefficient }}
      </el-descriptions-item>
      <el-descriptions-item
        label="有机质
"
      >
        {{ form.yjz }}
      </el-descriptions-item>
      <el-descriptions-item
        label="碱解氮
"
      >
        {{ form.n }}
      </el-descriptions-item>
      <el-descriptions-item
        label="有效磷
"
      >
        {{ form.p }}
      </el-descriptions-item>
      <el-descriptions-item
        label="速效钾
"
      >
        {{ form.k }}
      </el-descriptions-item>
      <el-descriptions-item
        label="介绍
"
        :span="2"
      >
        {{ form.descri }}
      </el-descriptions-item>
      <el-descriptions-item label="图片" :span="2">
        <img alt="" :src="form.picture" />
      </el-descriptions-item>
    </el-descriptions>
  </el-dialog>
</template>

<script>
  export default {
    data() {
      return {
        dialogVisible: false,
        form: {},
        attrs: [{ name: '', namekey: '', span: 1 }],
      }
    },
    methods: {
      show(row) {
        this.dialogVisible = true
        this.form = row
      },
    },
  }
</script>

<style lang="scss" scoped></style>
